#include "include/network/packet/JoinInfoPacket.h"

JoinInfoPacket::JoinInfoPacket(const Node &joinNode, const Node &prevJoinNode) {
    this->joinNode = new Node(joinNode.getId(), joinNode.getAddress(),
                              joinNode.getPort(), joinNode.getPaintColor());
    this->prevJoinNode = new Node(prevJoinNode.getId(), prevJoinNode.getAddress(),
                                  prevJoinNode.getPort(), prevJoinNode.getPaintColor());
}

JoinInfoPacket::~JoinInfoPacket() {
    delete joinNode;
    delete prevJoinNode;

}

PacketType JoinInfoPacket::getPacketType() const {
    return JOIN_INFO;
}
